---
redirect_from:
  - /using-the-cubejs-cli
---

# CLI

The Cube command line interface (CLI) is used for various Cube workflows. It
could help you in areas such as:

- Creating a new Cube service.
- Generating a data model based on your database tables.

See the [CLI command reference][ref-ref-cli] for details on all commands.

## Quickstart

Once installed, run the following command to create new Cube service

```bash
npx cubejs-cli create <project name> -d <database type>
```

specifying the project name and your database using `-d` flag. Available
options:

- `postgres`
- `mysql`
- `mongobi`
- `athena`
- `redshift`
- `bigquery`
- `mssql`
- `clickhouse`
- `snowflake`
- `presto`

For example,

```bash
npx cubejs-cli create hello-world -d postgres
```

Once run, the `create` command will create a new project directory that contains
the scaffolding for your new Cube project. This includes all the files necessary
to spin up the Cube backend, example frontend code for displaying the results of
Cube queries in a React app, and some example data model files to highlight the
format of the Cube Data Model layer.

The `.env` file in this project directory contains placeholders for the relevant
database credentials. For MySQL, Redshift, and PostgreSQL, you'll need to fill
in the target host, database name, user and password. For Athena, you'll need to
specify the AWS access and secret keys with the [access necessary to run Athena
queries][link-athena-access], and the target AWS region and [S3 output
location][link-athena-output] where query results are stored.


[link-athena-access]: https://docs.aws.amazon.com/athena/latest/ug/access.html
[link-athena-output]: https://docs.aws.amazon.com/athena/latest/ug/querying.html
[ref-ref-cli]: /reference/cli